package com.roc.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.roc.dao.DaoException;
import com.roc.dao.IRoleDao;
import com.roc.pojo.RoleBean;
import com.roc.service.IRoleService;
import com.roc.service.ServiceException;
@Service
@Transactional
public class RoleServiceImple implements IRoleService{
	
	private Logger logger=Logger.getLogger(OrgServiceImpl.class);

	@Autowired
	IRoleDao roleDao;
	
	
	@Override
	public List<RoleBean> queryRoleList(String orgCode) throws ServiceException {
		// TODO Auto-generated method stub
		List<RoleBean> roleList=new ArrayList<RoleBean>();
        try{
        	roleList=roleDao.queryRoleList(orgCode);
        }catch (DaoException e) {
			logger.debug(e.getMessage());
			throw new ServiceException("加载角色失败~！");
		}
		return roleList;
	}

}
